<template>
	<view class="wordfir" style="height:70%;">
		<view class="u-flex-1 u-flex u-row-center">
			<view class="u-text-center" style="height: 50%; width: 70%; ">
				<text class="datefont-1" space="nbsp">{{day}}{{' '}}</text>
				<text class="datefont-2" space="nbsp">{{monthEng}}.{{' '}}{{year}}</text>
			</view>
		</view>
		<view class="u-flex-4 wordfir u-row-center u-col-center">
			<view class="u-text-center" style="height: 30%; width: 70%;;">
				<text class="wordfont-1" space="nbsp">{{word}}</text>
				<text class="wordfont-2" space="nbsp">[{{soundmark}}]</text>
			</view>
			<view class="u-text-center" style="height: 30%; width: 70%;">
				<text class="wordfont-2 u-margin-top-30" space="nbsp">{{paraphrase}}</text>
			</view>
		</view>
		<!-- <view class="u-flex-2">
			<u-divider class="u-margin-top-30"half-width="250">小英</u-divider>
			<view class="fen  u-flex u-row-around u-padding-top-20" style="width: 100%; height: 50rpx;">
				<view class="u-margin-top-70" style="width: 50rpx; height: 50rpx;">
					<u-icon index="0" size="50" name="star" color="#707070"></u-icon>
				</view>
				<view class="u-margin-top-70" style="width: 50rpx; height: 50rpx;">
					<u-icon index="1" size="50" name="zhuanfa" color="#707070"></u-icon>
				</view>
			</view>
		</view> -->
	</view>
</template>

<script>
	export default {
		name:"y-ci",
		data() {
			return {
				year:new Date().getFullYear(),
				monthEng:"Jan",
				day:new Date().getDate(),
				CtoE: {
					1: "Jan",
					2: "Feb",
					3: "Mar",
					4: "Apr",
					5: "May",
					6: "Jun",
					7: "Jul",
					8: "Aug",
					9: "Sept",
					10: "Oct",
					11: "Nov",
					12: "Dec"
				},
				wordlist:[
					{
						word:"academic",
						paraphrase:"学术的",
						soundmark:"ækəˈdemɪk",
					}
				],
				word:'',
				soundmark:'',
				paraphrase:''
			};
		},
		beforeMount() {
			this.MoutoEng()
			uniCloud.callFunction({
				name:"getword",
				success: (e) => {
					let length = e.result.data.length;
					let day = new Date().getDate();
					let word_current = day % length;
					this.word = e.result.data[word_current].word;
					this.paraphrase = e.result.data[word_current].paraphrase;
					this.soundmark = e.result.data[word_current].soundmark;
				}
			})
		},
		methods:{
			MoutoEng(){
				var mouth = new Date().getMonth()+1;
				this.monthEng = this.CtoE[mouth]
			}
		}
	
	}
</script>

<style>
.wordfir{
	display: flex;
	flex-direction: column;
	
}
.datefont-1{
	font-size: 60rpx;
	color: #000000;
	font-family: "times";
}
.datefont-2{
	font-size: 30rpx;
	color: #606266;
	font-weight: initial;
}
.wordfont-1{
	font-size: 80rpx;
	color: #000000;
}
.wordfont-2{
	display: block;
	font-size: 40rpx;
	color: #606266;
}
</style>
